#ifndef __COMMON_H
#define __COMMON_H

typedef unsigned char      u_char;
typedef unsigned char      u_int8;
typedef unsigned short int u_int16;
typedef unsigned int       u_int32;

#ifdef WIN32
#define PRINT_INFO(str, ...) fprintf(stderr, str, __VA_ARGS__)
#define PRINT_WARNING(str, ...) fprintf(stderr, "WARNING: " str, __VA_ARGS__)
#define PRINT_ERROR(str, ...) fprintf(stderr, "ERROR: " str, __VA_ARGS__)
#define PRINT_DEBUG(str, ...)   fprintf(stderr, "DEBUG(%s): " str, __FUNCTION__, __VA_ARGS__)
#else
#define PRINT_INFO(str, args...) fprintf(stderr, str, ##args)
#define PRINT_WARNING(str, args...) fprintf(stderr, "WARNING: " str, ##args)
#define PRINT_ERROR(str, args...) fprintf(stderr, "ERROR: " str, ##args)
#define PRINT_DEBUG(str, args...)   fprintf(stderr, "DEBUG(%s): " str, __func__, ##args)
#endif

#endif
